Your interview is approaching! Whether online or onsite, the technical C interview is likely the final step between you and your dream job. C interview questions are some of the most common technical questions, especially for roles involving embedded programming and OS. Companies like Apple and SpaceX have been known to use C. How can you make sure that you nail the C interview questions?
The key is to study the types of C interview questions you will be asked, then practice answering them using an interview platform like Leetcode. We’ve worked with hundreds of software engineers on each step of their job search and we know that a lot of time should go into interview preparation so that you can be confident and successful in your sessions.
In order to help you, we created a list of 66 C interview questions from real tech companies and included some tips for you to keep in mind during your interviews.
C interview questions
- Adobe question – What is the difference between malloc() and calloc()?
- Accenture question – Explain some important differences between C & C++
- ACI Worldwide question – What is the difference between method overloading and overriding?
- Google question – What is the difference between vector and arraylist?
- Microsoft question – What is “call by value” and “call by reference”?
- Facebook question – Explain dynamic memory and static memory allocation.
- VMWare question – What is memory allocation in C?
- Red Hat question – What is the difference between “var++” and “++var”?
- Google question – What is the use of “getch()” in a program?
- Apple question – What is the declaration and definition of a variable?
- VMWare question – Why is C a procedural language?
- Microsoft question – What are the concepts of OOPS?
- Red Hat question – What is collision in OOP?
- Infosys question – How is dynamic memory allocation done in C?
- Apple question – What are polymorphism, inheritance, and abstraction?
- Microsoft question – What is inheritance in regards to object oriented programming?
- Nvidia question – What is the difference between abstract and interface classes?
- VMWare question – Write a program to sort numbers.
- Accenture question – What is the difference between encapsulation and abstraction?
- Google question – What is the difference between i++ and ++i?
- Intel question – How would you explain servlets to 5 year old kids?
- Facebook question – What is the difference between ram memory and cache memory?
- Apple question – What are the differences between open loop and closed loop?
- Infosys question – What is a pointer? Give an example.
- 23andMe question – Implement a fibonacci sequence.
- VMWare question – Make an API call and display the data.
- Facebook question – What is a hashtable and how does it work?
- Red Hat question – What is a collision? How does a hashtable handle collisions?
- ACI Worldwide question – What are strings? How do you create a class which has the same functionality as string?
- ACI Worldwide question – What are exceptions? What are the types of exceptions? How do you create your own exception?
- Apple question – What is throw and throws? How do you throw an exception?
- Nvidia question – What is serializable? How do you make a class serializable? What is the use of a serializable interface?
- Apple question – What is synchronization?
- Google question – If I go to a site like gmail.com, I can login and see my email. If I close my browser and turn off my computer for a few days, the next time I turn it on and visit gmail.com it shows my email without me having to login again. How does this work?
- 23andMe question – How do you access data from linked hashmap?
- Google question – What is the difference between array and linked list?
- Facebook question – How is JAVA more secure than C? If C is not secure, why are OS written in C?
- Intel question – What is the difference between comparator and comparable interface?
- Adobe question – Evaluate the sum of points based on the words in a string.
- Nvidia question – How do you find the first non-repeating element in an array?
- VMWare question – If a customer has an issue with the speed of the data coming back, how would you go about handling that?
- Adobe question – Given a start and an end bound, return a list of all integers between the start and the end for which the digits are factors of the number.
- Nvidia question – Given an array of integers and a target value, write a function that returns True if any two numbers in the array add to target value.
- Adobe question – You are given an array of integers. What is the fastest way to generate an array where every integer at an index in the array is the product of all numbers in the given array except the number at that given index?
- Apple question – Write a function that finds the nth fibonacci number. What is the time/space complexity? Best/worst case scenario?
- Google question – How would you implement a semaphore with mutex?
- Apple question – How does a mobile app obtain data from a server?
- Adobe question – Find a string in an unsorted array of strings.
- Red Hat question – Search for a string in a sorted array of strings.
- Facebook question – How would you insert an element into an already sorted linked list to maintain sorted order?
- Red Hat question – Given a binary tree, find the lowest common ancestor of two nodes.
- Microsoft question – Calculate total number of manhole covers in San Francisco.
- Facebook question – Reverse a linked list.
- Nvidia question – Given a list of ranges, merge the ranges that have overlap, and return the resulting ranges.
- Google question – Traverse a directed graph with cycle, without having to implement hashcode() or equals() in the node class.
- VMWare question – How do you implement a singleton?
- Apple question – If a user is uploading images and we’re storing them somewhere… How would you name the files and where would they go?
- Adobe question – You are given a rectangle’s height, width, and the x and y coordinates of its upper left-hand corner. Given two rectangles, write code to indicate when there is an intersection between them.
- Intel question – What is the difference between struct and union?
- Microsoft question – What is the difference between OS fundamentals and sorting a stack?
- VMWare question – Given an array of n numbers, return an array ans such that ans[i] contains the product of all elements in array except array[i].
- Nvidia question – What is the difference between thread and process?
- Google question – A Chinese phone is to be sold in India and language conversion is required for the phone. What are the s/w and h/w changes required to do so?
- VMWare question – There is an array of size n which consists of any numbers from 1 to n. Find the numbers in the array which appear more than once.
- Intel question – Write a function for reversing a doubly linked list.
- Microsoft question – Explain a few sorting algorithms. What are their complexities?
Before Diving in, Ask Clarifying Questions
Sometimes, interviewers ask intentionally vague questions. Even if it’s a highly technical C interview question, they may not provide enough context to solve it right away. Always take about 15-30 seconds to think about clarifying questions. Some examples are: “Are repetitions allowed?” or “Do you want to return permutations or combinations?”
Proactively Show Positive Signals
This is a strong tactic used by candidates who want to reduce the amount of opportunities to show negative signals. The tradeoff is time, of course. But, in general, including 30 second “tidbits” of knowledge bodes well. For example, talk about runtime and space complexity proactively, but only if you are confident.
Make Context Statements
Context statements are the difference between doing something and providing the reasoning before doing something. If you give proper context. you can change the way you are interpreted for the better. So, if you are doing something that is opinionated action, provide the rationale behind it.
Know How to Get Help
Some interviewers just hate the word, “hint” so a better approach is to ask around the word. Instead, try saying, “my assumptions are X and Y, I’m thinking of doing Z. But I’m struggling with solving [problem].” You can also ask collaborative questions like,
- I was wondering if you had any thoughts.
- Do you think I’m going down the right direction?
- Do you think my assumptions are incorrect?
Ask the right kinds of questions
It’s important to ask common permission questions like, “Can I Google the C coding syntax online?” or “Is it okay if I write some thoughts down on a pen and paper?” It’s also better if you tend towards closed questions such as, “should I code this solution or think of something more optimal?” versus “What should I do next?”
With these questions & tips in your back pocket, you should be more than prepared for your next technical onsite interview. Feel like you need more help? Check out these resources to practice more software engineering interview questions.
You can also review our other interview question lists:
- Software Engineer Interview Questions
- C# interview questions from top tech companies
- Behavioral interview questions from top tech companies
- Java interview questions from top tech companies
- Javascript interview questions from top tech companies
- C interview questions from top tech companies
- Python interview questions from top tech companies
- Data science interview questions from top tech companies
- Apple software engineer interview questions
- Engineering interview questions from top tech companies
About Pathrise
Pathrise is a career accelerator that works with students and professionals 1-on-1 so they can land their dream job in tech. With these tips and guidance, fellows have seen their interview scores double.
If you want to work with any of our mentors 1-on-1 to get help with your c interview questions interviews or with any other aspect of the job search, become a Pathrise fellow.